package edu.mju.eduservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(name = "service-order", fallback = OrderFeignCilentImpl.class)
public interface OrdersClient {

    /**
     * 根据课程id和用户id查询订单表中订单状态
     * @param courseId 课程id
     * @param id 用户id
     * @return 已支付：true 未支付：false
     */
    @GetMapping("/eduorder/study-order/isBuyCourse/{courseId}/{id}")
    public boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("id") String id);
}
